package com.wang.mall.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("oauth-server")
public interface OauthServerFeign {


    @PostMapping("/oauth/token")
    ResponseEntity<JwtToken> oauth(@RequestParam("grant_type") String grantType,
                                   @RequestParam("username") String username,
                                   @RequestParam("password") String password,
                                   @RequestParam("login_type") String loginType,
                                   @RequestHeader("Authorization") String basicToken // 第三方客户端加密出来的值
    );
}
